feat(issues): gate issue-fields features behind remote_mcp_issue_fields flag#2520
Merged
SamMorrowDrums merged 2 commits intoMay 21, 2026
Merged
Conversation
…ds flag Gates the recently merged issue-fields work (list_issue_fields tool, field_values enrichment on list_issues/search_issues, and field_filters input on list_issues) behind a new feature flag, also enabled in insiders mode. - list_issues splits into two same-named registrations: the field-aware variant requires the flag, while LegacyListIssues (FeatureFlagDisable) preserves the prior schema and GraphQL selection set so disabled callers don't pay the extra wire/server cost. - search_issues skips the field-values lookup when the flag is off. - list_issue_fields requires the flag to be registered at all. - Adopts <tool>_ff_<flag>.snap naming for flagged toolsnap variants so same-named duplicates each get a distinct snapshot. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
13 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new feature flag (remote_mcp_issue_fields) to gate Issues 2.0 custom-field functionality so it can be rolled out independently without impacting callers that don’t opt in.
Changes:
- Adds
FeatureFlagIssueFields(remote_mcp_issue_fields) to the allowed + insiders feature flag lists. - Splits
list_issuesinto two mutually-exclusive registrations (flag-enabled field-aware variant vs. flag-disabled legacy variant) and gateslist_issue_fieldsregistration behind the same flag. - Skips
search_issuesfield-values enrichment unless the flag is enabled, and adds a separate toolsnap for the flag-enabledlist_issuesschema.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates generated tool documentation (currently shows duplicate list_issues entries). |
| pkg/github/tools.go | Registers LegacyListIssues alongside the flag-enabled ListIssues. |
| pkg/github/minimal_types.go | Adds legacy GraphQL fragment → minimal response conversion helpers. |
| pkg/github/issues.go | Adds legacy GraphQL query types + handler; gates search_issues enrichment; adds feature-flag annotations for both list_issues variants. |
| pkg/github/issues_test.go | Updates toolsnap expectations for the flag-enabled list_issues variant and adds tests for LegacyListIssues. |
| pkg/github/issue_fields.go | Gates list_issue_fields tool registration behind FeatureFlagIssueFields. |
| pkg/github/feature_flags.go | Defines FeatureFlagIssueFields and includes it in Allowed/Insiders feature flag sets. |
| pkg/github/toolsnaps/list_issues.snap | Updates canonical list_issues snap to the legacy schema (no field_filters). |
| pkg/github/toolsnaps/list_issues_ff_remote_mcp_issue_fields.snap | Adds a new toolsnap for the flag-enabled list_issues schema variant. |
Copilot's findings
- Files reviewed: 9/9 changed files
- Comments generated: 3
Comment on lines
+912
to
+916
| - **list_issues** - List issues | ||
| - **Required OAuth Scopes**: `repo` | ||
| - `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional) | ||
| - `direction`: Order direction. If provided, the 'orderBy' also needs to be provided. (string, optional) | ||
| - `labels`: Filter by labels (string[], optional) |
- docs generator: install a no-flags feature checker so README reflects the default user experience (tools enabled with no special flags), fixing duplicate `list_issues` and removing granular/flagged-only tools that were never meant to appear in the default docs. - csv_output: drop the FeatureFlagEnable/Disable exclusion in isCSVOutputTool. Wrapping happens before the per-request flag filter picks the live variant, so flag-gated list_* tools wrap safely; this restores CSV conversion for `list_issues` and enables it for `list_issue_fields` when both flags are on. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gates the recently merged issue-fields work behind a new feature flag (
remote_mcp_issue_fields), also enabled in insiders mode, so it can be rolled out independently.What's gated
list_issue_fieldstool — registered only when flag is enabled (FeatureFlagEnable).search_issuesfield_values enrichment — runtime check; the GraphQL field-values lookup is skipped when the flag is off.list_issues— split into two same-named registrations:field_filtersinput andfield_valuesoutput) requires the flag.LegacyListIssues(FeatureFlagDisable) preserves the prior schema and GraphQL selection set, so disabled callers don't pay extra wire/server cost.Approach
Per discussion, we deliberately duplicate the GraphQL types and query path for
list_issuesrather than runtime-strip. GraphQL cost is paid at field-selection time, and duplication makes flag removal trivial — just delete whichever branch we don't keep.Toolsnap convention
Adopted
<tool>_ff_<flag>.snapfor flagged variants so same-named duplicates each get a distinct snapshot:list_issues.snap— legacy schemalist_issues_ff_remote_mcp_issue_fields.snap— field-aware schemaNo changes to
internal/toolsnapswere needed; the helper already takes the snap filename from the caller.Validation
script/lint— 0 issuesscript/test— all packages passscript/generate-docs— README + docs updatedscript/print-mcp-diff-configsauto-emits a--features=remote_mcp_issue_fieldsmatrix entryFollow-up
The inbound
issue_writefield-changes PR will need to layer this flag on top ofFeatureFlagIssuesGranular. That's expressible with the existing single-string flag fields (4-way duplication) — deferred to that PR.